home *** CD-ROM | disk | FTP | other *** search
- SMTPpost SMTPpost
-
-
- NAME
-
- SMTPpost - post a mail message using SMTP
-
-
- SYNOPSIS
-
- SMTPpost [-f fromuser] [-R userrealname] [-s subject] [-r]
- [-Q] [-S]
- [-raw] [-n] [-t to-addr] [-c cc-addr] [-b bcc-addr]
- [mailfile | addresses] <mailfile
-
-
- DESCRIPTION
-
- SMTPpost uses SMTP (per RFC-821) to post 'mailfile' to the
- addresses specified via the -t, -c and -b arguments. If none
- of -t, -c or -b are specified, the destination addresses are
- obtained from the headers in 'mailfile'.
-
- Whenever an address is required, a comma-separated set of
- addresses may be applied. If they are for the -t, -c or -b
- arguments, there may be *no* white-space in between the
- addresses.
-
- SMTPpost will attempt to open a TCP SMTP socket to each
- destination host. If that fails, SMTPpost will attempt to
- forward the mail to the SMTPSmarterHost (which is specified
- via a required configuration variable). If a socket cannot
- be opened, then SMTPpost will store the article in the
- SMTPSpoolDir (which is also specified via another required
- configuration variable) for processing later by SMTPd.
-
- The -Q argument tells SMTPpost to *not* try to send the
- message immediately. Instead, the article is queued into
- SMTPSpoolDir and SMTPd is expected to process the actual
- transmission of the message.
-
- The -S argument tells SMTPpost to *not* try to access the
- destination host at all. All messages will go directly to
- SMTPSmarterHost (or be queued if it isn't available or if
- the -Q argument is specified).
-
- For the cases where the destination address is the local
- host, SMTPpost also requires the SMTPMailDir configuration
- variable to be assigned, denoting the appropriate directory.
-
- If the delivery succeeds, SMTPpost will log that in the
- INetUtils logfile (INet:Logfile) and return a program value
- of zero.
-
- If the delivery fails, SMTPpost will log that as well, along
- with a description failure reason. SMTPpost will return a
- program value of thirty (30) in that case.
-
- "mailfile" may be specified on the command line, or as the
- standard input.
-
- If SMTPpost's program name starts with an 'r' (such as 'rsmtp')
- then SMTPpost assumes that all command line arguments are
- addresses that the mailfile (which *must* be on standard input)
- are to be delivered to. "mailfile" must be fully formed and
- complete. SMTPpost will not add a "Subject:", "From:" or an
- "Organization:" header in this case. This is called "receive
- mail" mode.
-
- Options:
-
- -b addrs : Specify an address to which a message is
- be sent (the Blind Carbon Copy header).
- The -b argument may be repeated any
- number of times. No BCC recipient is
- aware of any other BCC recipient.
-
- -c addrs : Specify an address which is to be added
- to the Carbon-Copy list (the CC: headers).
- The -c argument may be repeated any number
- of times.
-
- -f username : The username to be used in building a From
- header in the article. Note that if a From
- header already exists in the article, then
- SMTPpost will not create another one.
-
- -n : Do not queue. If the delivery to either the
- destination host and to SMTPSmarterHost
- fails, SMTPpost will normally queue the
- article in SMTPSpoolDir. Setting this
- option prevents that from happening (this
- is intended primarily for SMTPd).
-
- -Q : Queue the message, do not send immediately.
-
- -S : Do not attempt a connection to the destination
- host, route the message to SMTPSmarterHost.
-
- -r : Receive mail mode. All arguments after -r
- are treated as addresses that mailfile (which
- *must* be in standard input) is to be
- delivered to. See discussion above.
-
- -raw : Normally, if all of -f, -R and -s are not
- specified, SMTPpost will scan "mailfile"
- to obtain the missing headers. This option
- prevents that from occurring. Empty headers
- are created instead.
-
- -R realname : The real name of the user to be used in
- building a From header for the message.
-
- -s text : The subject of the message. "text" may
- be quoted (and in fact, must be if there
- is any whitespace in it).
-
- -t addrs : Specify a destination address for the message.
- This one is for the To: header. The -t
- argument may be repeated any number of times.
-
- DIAGNOSTICS
-
- Upon success, SMTPpost has a return status of zero.
-
- If the destination host was not available, and SMTPpost queued
- the message (or left it queued, when called from SMTPd); then
- SMTPpost has a return status of 5.
-
- Upon failure of any kind, SMTPpost prints a message to standard
- output, and has an exit status of 30. SMTPpost also prints the
- error message in INet:Logfile.
-
-
- CONFIGURATION
-
- CheckUser string
-
- The CheckUser variable defines a program which is executed for
- incoming mail to validate whether the destination user actually
- exists. To wit:
-
- CheckUser userid
-
- SMTPpost checks the first character of standard output from the
- program (stdout). If it is a '*', then the user is deemed invalid.
- Any other output (or no output) results in the userid being
- accepted as valid.
-
- NOTE: this feature is not available in the freeware version of
- SMTPpost.
-
- HostAliases string
-
- The HostAliases variable contains other hostnames which are the
- local host. For example, if your host is "x.y.z", but you also
- need to accept mail to "zz.zz" as local to you, you should set
- that in HostAliases.
-
- In general, put "localhost,[ip.address],ip.address" plus any
- others into HostAliases.
-
- The comparison is *not* case sensitive.
-
- NOTE: The freeware version of SMTPpost only allows two aliases.
-
- UserName string
-
- The login id of the current user. Either this or "-f" must be
- specified.
-
- RealName string
-
- The real name of the current user. Either this or "-R" must be
- specified.
-
- NodeName string
-
- The name of the current node (computer); normally without a domain.
-
- DomainName string
-
- The name of the current domain.
-
- HostName string
-
- The fully qualified domain name of the current computer.
-
- Either this, or NodeName *and* DomainName must be specified.
-
- SMTPAlwaysQueue no/yes
-
- When set to "yes", then SMTPpost will act as if -Q was passed.
- The default is "no".
-
- SMTPMailDir string
-
- The directory where local mail is stored. For AmiTCP, this will
- defaults to "AmiTCP:Mail/", for AS225, this will default to
- "INet:Mail/".
-
- SMTPRoute string
-
- SMTPRoute may have any of four values, comma or space separated.
- The values are:
-
- MX
- SMTP
- SmarterHost
- UUCP
-
- These values control the way SMTPpost attempts to deliver mail to
- remote hosts.
-
- MX indicates to use the MX record (from DNS) to deliver the mail
- to the destination host via the forwarding host specified in the
- MX record.
-
- SMTP indicates to attempt to deliver the mail directly to the
- remote host.
-
- SmarterHost indicates to deliver the mail to the host specified
- as the SMTPSmarterHost configuration variable.
-
- UUCP indicates to deliver the mail using the mail program specified
- as the UUCPSendMail configuration variable.
-
- The default value is "MX,SMTP,SmarterHost,UUCP". UUCP transfers are
- not attempted if UUCPSendMail is not defined.
-
- NOTE: the freeware version of SMTPpost will only utilize the first
- MX record for any destination host.
-
- SMTPSmarterHost string
-
- A computer that is assumed to be smarter about delivering SMTP mail
- than we are. This assignment is required.
-
- SMTPSpoolDir string
-
- The directory where outgoing mail is stored; which could not be
- immediately processed.
-
- For AmiTCP, this defaults to "AmiTCP:MailSpool/", for AS225 this will
- default to "INet:MailSpool/".
-
- UUCPSendMail string
-
- If the SMTPRoute variable includes UUCP as a part of it, then this
- variable must be defined. It defines the program name of the UUCP
- mail program (typically UUCP:C/RMail).
-
- This must be an RMail type program which takes an address to deliver
- as the command line. For example:
-
- setenv UUCPSendMail uucp:c/sendmail -r -b
-
- or
-
- setenv UUCPSendMail inet:c/smtppost -r
-
- NOTES
-
- Performance is improved if you make SMTPpost and RSMTP resident.
-
- SMTPpost duplicates the arguments used by the AmigaUUCP sendmail.
- It can be dropped-in as a replacement for that. The only exception
- is that SMTPpost requires addresses following a "-r", whereas the
- AmigaUUCP sendmail does not.
-
- SMTPpost has been tested with AmigaUUCP, wUUCP, GRn, and BBX and a
- variety of Unix sendmail/smail programs.
-
- SMTPpost will attempt to run a command named by the MAILREADYCMD
- environment variable when delivering local mail. The format of the
- command is:
-
- MAILREADYCMD -x T:MailRdy
-
- SMTPpost will also send a signal to a public message port named
- "T:MailRdy" if it is on the system public list.
-
- For DNS resolution, SMTPpost gets the nameservers and domains to search
- from the inet:db/resolv.conf file (for AS225r2 and its derivatives) and
- from amitcp:db/netdb-myhost (for AmiTCP 2.2 and above).
-
- BUGS/TODO
-
- SMTPpost doesn't accept full RFC-822 addresses.
-